package com.applink.sell_proof.dialog;

import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.applink.sell_proof.R;

public class WaitingDialog extends DialogFragment {
	public static final String TAG = "WaitingDialog";

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		int colorbackgroud = getArguments().getInt(TAG);
		View layout = inflater.inflate(R.layout.loading_page, null, false);
		layout.findViewById(R.id.loading_page).setBackgroundResource(
				colorbackgroud);
		return layout;
	}

	public WaitingDialog(int backgroundColorId) {
		super();
		setStyle(STYLE_NO_FRAME, 0);
		Bundle data = new Bundle();
		data.putInt(TAG, backgroundColorId);
		setArguments(data);
	}

	public boolean isFullScreen() {
		return getArguments().getInt(TAG) == R.color.transparent;
	}

}
